package com.chenfubing.ps.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chenfubing.ps.entity.Access;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chenfubing.ps.entity.User;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chenfubing
 * @since 2020-05-05
 */
public interface IAccessService extends IService<Access> {

    /**
     * 添加门禁
     * @param access
     */
    void addAccess(Access access);

    /**
     * 删除门禁
     * @param id
     */
    void deleteAccess(int id);

    /**
     * 查询
     * @param startTime
     * @param endTime
     * @param license
     * @return
     */
    List<Access> findAccess(LocalDateTime startTime, LocalDateTime endTime, String license);

    /**
     * 获取门禁分页
     * @param pageNum
     * @param pageSize
     * @return
     */
    Page<Access> getAccessPage(int pageNum,int pageSize);

    /**
     * 导出门禁表
     */
    void export();

    User getUserByAccessId(int id);


}
